
let suites :  Mt.pair_suites ref  = ref []
let test_id = ref 0
let eq loc x y = Mt.eq_suites ~test_id ~suites loc x y



let v = Int64.to_string Int64.max_int
;; eq __LOC__ v "9223372036854775807"
let f a b =
  eq __LOC__ (Int64.to_string a) b

let hh =   Int64.(add min_int 100L)

;; eq __LOC__
  hh
  (-9223372036854775708L)
;; f (-33L) "-33"
;; f (33L) "33"
;; f Int64.min_int "-9223372036854775808"
;; f hh
  "-9223372036854775708"
;; f (1_000_000_000_000_000L) "1000000000000000"
;; for i = 0 to 8 do
  eq __LOC__ (Int64.(to_string (add min_int (of_int i))))
  ("-922337203685477580" ^ string_of_int (8 - i))
done
;; for i = 0 to 8 do
  eq __LOC__ (Int64.(to_string (add min_int (of_int @@ 100 + i))))
  ("-922337203685477570" ^ string_of_int (8 - i))
done
;; for i = 0 to 8 do
  eq __LOC__ (Int64.(to_string (add min_int (of_int @@ 1_000_000 + i))))
  ("-922337203685377580" ^ string_of_int (8 - i))
done


let u = 9007199254730991L
(*  + 100 *)
;; for i = 0 to 6 do
  let open Int64 in
  eq __LOC__ (u |. add (i * 100_00 |. of_int) |. to_string) ("90071992547"^ (string_of_int (3+i)) ^ "0991")
done

let v = -9007199254790991L

;; for i = 0 to 9 do
  let open Int64 in
  eq __LOC__ (v |. add (i * 100_00 |. of_int) |. to_string) ("-90071992547"^ (string_of_int (9-i)) ^ "0991")
done

;; eq __LOC__ (9007199254740991L |. Int64.to_string) ("9007199254740991")
;; eq __LOC__ (-9007199254740991L |. Int64.to_string) ("-9007199254740991")
;; eq __LOC__ (Int64.to_string (-233L)) "-233"
;; eq __LOC__ Int64.(to_string 9223372036854775807L) "9223372036854775807"

let random_data = [[9222265526802072873L,"9222265526802072873"];
[-9222265526802072873L,"-9222265526802072873"];
[8259675854677364784L,"8259675854677364784"];
[-8259675854677364784L,"-8259675854677364784"];
[8835388831347763546L,"8835388831347763546"];
[-8835388831347763546L,"-8835388831347763546"];
[8432790778033508297L,"8432790778033508297"];
[-8432790778033508297L,"-8432790778033508297"];
[8803803312937127383L,"8803803312937127383"];
[-8803803312937127383L,"-8803803312937127383"];
[8554209517442287148L,"8554209517442287148"];
[-8554209517442287148L,"-8554209517442287148"];
[8827502340722511268L,"8827502340722511268"];
[-8827502340722511268L,"-8827502340722511268"];
[8959938688116877129L,"8959938688116877129"];
[-8959938688116877129L,"-8959938688116877129"];
[8375343173485592219L,"8375343173485592219"];
[-8375343173485592219L,"-8375343173485592219"];
[8247185433903973425L,"8247185433903973425"];
[-8247185433903973425L,"-8247185433903973425"];
[8877202292449085084L,"8877202292449085084"];
[-8877202292449085084L,"-8877202292449085084"];
[8714039183933054831L,"8714039183933054831"];
[-8714039183933054831L,"-8714039183933054831"];
[8882991722536356759L,"8882991722536356759"];
[-8882991722536356759L,"-8882991722536356759"];
[8334238200124664212L,"8334238200124664212"];
[-8334238200124664212L,"-8334238200124664212"];
[9187027304886433402L,"9187027304886433402"];
[-9187027304886433402L,"-9187027304886433402"];
[9133057717520266586L,"9133057717520266586"];
[-9133057717520266586L,"-9133057717520266586"];
[9166371576562570333L,"9166371576562570333"];
[-9166371576562570333L,"-9166371576562570333"];
[8654171949643731022L,"8654171949643731022"];
[-8654171949643731022L,"-8654171949643731022"];
[9034842133647271125L,"9034842133647271125"];
[-9034842133647271125L,"-9034842133647271125"];
[8608580663100712151L,"8608580663100712151"];
[-8608580663100712151L,"-8608580663100712151"];
[8820716511945020972L,"8820716511945020972"];
[-8820716511945020972L,"-8820716511945020972"];
[9156810478222264303L,"9156810478222264303"];
[-9156810478222264303L,"-9156810478222264303"];
[8755426876594915757L,"8755426876594915757"];
[-8755426876594915757L,"-8755426876594915757"];
[8774739039348243521L,"8774739039348243521"];
[-8774739039348243521L,"-8774739039348243521"];
[9075741205602894645L,"9075741205602894645"];
[-9075741205602894645L,"-9075741205602894645"];
[8786231674279984331L,"8786231674279984331"];
[-8786231674279984331L,"-8786231674279984331"];
[8949021411802516758L,"8949021411802516758"];
[-8949021411802516758L,"-8949021411802516758"];
[8524723253526423954L,"8524723253526423954"];
[-8524723253526423954L,"-8524723253526423954"];
[8513293021681741708L,"8513293021681741708"];
[-8513293021681741708L,"-8513293021681741708"];
[8421467387985654104L,"8421467387985654104"];
[-8421467387985654104L,"-8421467387985654104"];
[8408716644548688797L,"8408716644548688797"];
[-8408716644548688797L,"-8408716644548688797"];
[8742836281862819756L,"8742836281862819756"];
[-8742836281862819756L,"-8742836281862819756"];
[8499829234439401537L,"8499829234439401537"];
[-8499829234439401537L,"-8499829234439401537"];
[8324213839613616899L,"8324213839613616899"];
[-8324213839613616899L,"-8324213839613616899"];
[9113404037906038527L,"9113404037906038527"];
[-9113404037906038527L,"-9113404037906038527"];
[8925488822310827593L,"8925488822310827593"];
[-8925488822310827593L,"-8925488822310827593"];
[9078209327951782997L,"9078209327951782997"];
[-9078209327951782997L,"-9078209327951782997"];
[8785053603418932244L,"8785053603418932244"];
[-8785053603418932244L,"-8785053603418932244"];
[8455581919940329271L,"8455581919940329271"];
[-8455581919940329271L,"-8455581919940329271"];
[8955835585569938560L,"8955835585569938560"];
[-8955835585569938560L,"-8955835585569938560"];
[9045075481293885891L,"9045075481293885891"];
[-9045075481293885891L,"-9045075481293885891"];
[8500775118540200419L,"8500775118540200419"];
[-8500775118540200419L,"-8500775118540200419"];
[9143290613252626570L,"9143290613252626570"];
[-9143290613252626570L,"-9143290613252626570"];
[8724850568849864514L,"8724850568849864514"];
[-8724850568849864514L,"-8724850568849864514"];
[9165646820667917008L,"9165646820667917008"];
[-9165646820667917008L,"-9165646820667917008"];
[8820340945276105736L,"8820340945276105736"];
[-8820340945276105736L,"-8820340945276105736"];
[9111963357615419435L,"9111963357615419435"];
[-9111963357615419435L,"-9111963357615419435"];
[9207756291626696888L,"9207756291626696888"];
[-9207756291626696888L,"-9207756291626696888"];
[8936229796511192184L,"8936229796511192184"];
[-8936229796511192184L,"-8936229796511192184"];
[8852749148056563032L,"8852749148056563032"];
[-8852749148056563032L,"-8852749148056563032"]]

;; Belt.List.forEach random_data (fun u->
  match u with
  | [v , str]  -> eq __LOC__ (Int64.to_string v) str
  | _ -> assert false
 )

 ;; eq __LOC__ (Int64.to_string (-9007199254740991L)) "-9007199254740991"
 ;; eq __LOC__ (Int64.to_string (-9007199254740992L)) "-9007199254740992"
;; Mt.from_pair_suites __LOC__ !suites

